<template>
  <div>
    <MyHeader :bgcolor="'green'" :title="'个人购物车'"></MyHeader>
    <MyGoods :arr="goods"></MyGoods>
    <MyFooter :arr="goods"></MyFooter>
  </div>
</template>

<script>
import MyHeader from "./components/MyHeader.vue";
import MyGoods from "./components/MyGoods.vue";
import MyFooter from "./components/MyFooter.vue";
import { getList } from "./api/getList";
export default {
  data() {
    return {
      goods: [],
    };
  },
  components: {
    MyHeader,
    MyGoods,
    MyFooter,
  },
  created() {
    getList()
      .then((result) => {
        this.goods = result.data.list;
        console.log(this.goods);
      })
      .catch((err) => {
        console.log(err);
      });
  },
};
</script>

<style>
</style>